﻿/**
*@description 客户公开级别变更表单
*/
Chenxin.UI.PubCustomerForm = Chenxin.extend(Chenxin.UI.FormCommon, {
    actionUrl: 'service/CustomerMgr.ashx',
    id: 'pubcustomerWin',
    renderTo: 'jqm_pubcustomer',
    op:'setpublevel',
    jqmWidth: 600,
    createForm: function() {
        return Chenxin.FormCommon.PubCustomerForm('pubcustomer');
    },
    createComboList: function() {
        var _this=this;
        
        this.customerpublevel = new Chenxin.UI.Combo({
            containerId: '#pubcustomerPubLevel',
            name: 'PubLevel',
            tbxWidth: 97,
            colWidth: 80,
            required:true,
            items: comboCommon.CustomerPubLevel
        });
        return [this.customerpublevel];
    },

    initEvent: function() {
        var _this = this;
        $('#pubcustomersave').live('click', function() {
            _this.op="setpublevel";
            if(_this.beforeSave){		
				if( !_this.beforeSave()){
				    return;
				}
			}
            _this.save();
        });
        $('#pubcustomercancle').live('click', function() {
            _this.hide();
        });

    },
    initComponent: function() {
        Chenxin.UI.PubCustomerForm.superclass.initComponent.call(this);
    }
});

Chenxin.FormCommon.PubCustomerForm=function(comboIdPrefix){
return '<table class="tbl_f"><tbody><tr><th>客户姓名：</th><td><input type="text"  maxlength="25"  name="CustomerName" class="inputbox_n" disabled="disabled"/></td><th>联系电话：</th><td><div style="float:left;"><input name="Phone" maxlength="50"  class="inputbox_n" id="Phone" type="text" disabled="disabled"/></div></td></tr><tr><th>手机：</th><td><div style="float:left;"><input name="Mobile"  maxlength="11"  class="inputbox_n" id="Mobile" type="text" disabled="disabled"/></div></td><th>操作人：</th><td><input type="text" maxlength="50" name="OprPerson" class="inputbox_n" disabled="disabled"/></td></tr><tr><th>操作部门：</th><td><input type="text" maxlength="50" name="OprDepart" class="inputbox_n" disabled="disabled"/></td><th>公开级别：</th><td><div id="' + comboIdPrefix + 'PubLevel" style="z-index:776; margin-right: 2px;" class="SelectWrapSingle"></div></td></tr><tr><td colspan="4"><input type="hidden"  name="CustomerId" /><div style="float:right; margin-right:15px;_margin-right:10px;*+margin-right:19px;"><a class="btn_n fl"  href="#"  id="' + comboIdPrefix + 'save"><span>提交</span></a><a id="' + comboIdPrefix + 'cancle" class="btn_n fl"  href="#" ><span>关闭</span></a></div></td></tr></tbody></table>';
};
